package com.test;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.test.NewAccount;
import com.test.R;
import com.test.MainActivity;

public class AdminActivity extends Activity {
	
	private Button login;
	private EditText userName, password;
	
	String tmpName = "admin";
	String tmpPwd = "admin";
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.admin);
        
        userName = (EditText) findViewById(R.id.txt_username);
		password = (EditText) findViewById(R.id.txt_password);
		
		login = (Button) findViewById(R.id.register);
		login.setOnClickListener(new OnClickListener(){

			public void onClick(View arg0) {
				System.out.println("button click");
				if(userName.getText().toString().equals(tmpName) && password.getText().toString().equals(tmpPwd)){
					System.out.println("correct!!");
					startActivity(new Intent(AdminActivity.this, AdminScreen.class));
				}
				
			}
			
		});
		
		

    }
}